odoo.define('Epidemic.TongjiPage',function(require){
    var AbstractAction=require('web.AbstractAction');
    var core=require('web.core');

    var TongjiPage=AbstractAction.extend({
        template:'EpidemicTongjiPage',
        start: function(){
            var self=this,
            var data,
            this._rpc({route:'/data/map',params:[]})
                .then(function(data){
                    self._show_map_graph(data);
                })
        },
        _show_map_graph:function(data){
            console.log(data);
            var $newsdata= document.getElementById('newsdata');
            var node_news= new DOMParaser().parseFromString(data,'text/html').body.children(0);
            $newsdata.appendChild(node_news);
        }

    });
    core.action_registry.add('epidemic.tongji.page',TongjiPage);
})

